import React from 'react'
import { PasswordIocn } from './Icon'
import { Form, Input as AntdInput } from 'antd'
import { NamePath } from 'antd/lib/form/interface'
import { Rule } from 'antd/lib/form'
import { PasswordProps } from 'antd/lib/input'
export  interface AccountPasswordProps extends Omit<PasswordProps,'name'> {
  name?:NamePath
  label?:string
  rules?:Rule[]
}
export const Password = ({ name, label,rules,...rest}:AccountPasswordProps) => {
  return <Form.Item label={label} name={name} rules={rules}>
      <AntdInput.Password  {...rest} />
  </Form.Item>
}
